const {ccclass, property} = cc._decorator;

@ccclass
export default class nodeBreath extends cc.Component {

    @property()
    scaleY:number = 1.02;
    
    @property()
    time:number = 1;

    startScale:number = 0;

    endScale:number = 0;

    onLoad(){
        this.startScale = this.node.scaleY;
        this.endScale = this.node.scaleY * this.scaleY;
        this.breathAni();
    }

    breathAni(){
        let onceTime:number = this.time / 2;
        let tween = cc.tween(this.node).to(onceTime,{scaleY:this.startScale}).to(onceTime,{scaleY:this.endScale});
        cc.tween(this.node).repeatForever(tween).start();
    }

}
//电子邮件puhalskijsemen@gmail.com
//源码网站 开vpn全局模式打开 http://web3incubators.com/
//电报https://t.me/gamecode999
